﻿@model IEnumerable<DLM.Domain.Model.User>
@using Webdiyer.WebControls.Mvc;
@{
    ViewBag.Title = "会员查找";
    Layout = "~/Views/Shared/_Master.cshtml";
}
<script type="text/javascript">
    $(document).ready(function () {
        $("div.box li").mouseover(function () {

            $(this).addClass("hover");
        });
        $("ul.search_result clearfix li").mouseout(function () {

            $(this).removeClass("hover");
        });
        $("a").css("cursor", "pointer");
    });
</script>
<!--main680px-->
<div class="main">
    <div class="main_tab_2">
        <div class="main_tab_2_up">
            <ul>
                <li class="current"><a href="#">搜索结果</a></li>
            </ul>
        </div>
        <div class="main_tab_2_down">
            <div class="box">
                <h3>
                    查询结果<a>共
                        @{ var count = 0; if (Model != null) { count = Model.Count(); }}
                        @count 条</a></h3>
                <div class="tr clearfix">
                    <ul class="search_result clearfix">
                        @if (Model != null)
                        {
                            foreach (var item in Model)
                            {
                               
                                        
                            <li>
                                <div class="pic">
                                  @if (item.Photo == "none_75_75.png")
                                  {
                                        <img src="@Url.Content("~/Content/ad/none_75_75.png")" alt="头像" height="77px" width="77px"/>
                                  }
                                  else
                                  { 
                                   <img src="@Url.Content("~/Files/Photos/" + item.UserID + "/Title/" + item.Photo)" height="77px" width="77px" />
                                  }
                                   </div>
                                <div class="info">
                                    <h4>
                                        @item.AccountName</h4>
                                    <p>
                                       <label>籍贯:</label> @item.NativePlace</p>
                                    <p>
                                       <label>现居住:</label> @item.Location</p>
                                </div>
                                <div class="action">
                                    @if (Request.IsAuthenticated)
                                    {
@* <a href="#" class="add_friend">加为好友</a>*@
@*  <a href="#" class="add_friend">打招呼</a>*@
                                    }<a href="@Url.Action("View", "User", new { id = item.UserID })" class="view_detail">查看详细</a></div>
                            </li>
                            }
                        }
                    </ul>
                </div>
            </div>
            <div class="paging">
            @Html.Pager(Model as PagedList<DLM.Domain.Model.User>, new PagerOptions
       {
           PageIndexParameterName = "pageIndex",
           CurrentPagerItemWrapperFormatString = "<span class=\"current\">{0}</span>",
           //NumericPagerItemWrapperFormatString = "<a>{0}</a>",
           PrevPageText = "<",
           NextPageText = ">",
           ShowNumericPagerItems = true,
           ShowFirstLast = false,
           ShowPrevNext = true,
           CssClass = "scott",
           MorePageText = "...",
           SeparatorHtml = ""
       })
       </div>
        </div>
    </div>
</div>
<!--main-end-->
